package com.liveinstars.account.business.service;

import com.liveinstars.account.business.domain.bo.User;
import com.liveinstars.api.dto.PhoneSmsRequest;
import com.liveinstars.api.dto.UnifyAppUpdateUserInfoReq;
import com.onepiece.shipelves.common.Result;

import java.util.List;

/**
 * @author tomsun28
 * @date 21:14 2018/3/17
 */
public interface UserService {

    /**
     * description TODO
     *
     * @param appId 1
     * @return java.lang.String
     */
    String loadAccountRole(String appId);

    /**
     * description TODO
     *
     * @return java.util.List<com.liveinstars.account.business.domain.bo.User>
     */
    List<User> getUserList();

    /**
     * description TODO
     *
     * @param roleId 1
     * @return java.util.List<com.liveinstars.account.business.domain.bo.User>
     */
    List<User> getUserListByRoleId(Integer roleId);

    /**
     * description TODO
     *
     * @param appId 1
     * @param roleId 2
     * @return boolean
     */
    boolean authorityUserRole(String appId, int roleId);

    /**
     * description TODO
     *
     * @param uid 1
     * @param roleId 2
     * @return boolean
     */
    boolean deleteAuthorityUserRole(String uid, int roleId);

    /**
     * description TODO
     *
     * @param appId 1
     * @return com.liveinstars.account.business.domain.bo.User
     */
    User getUserByAppId(String appId);

    /**
     * description TODO
     *
     * @param roleId 1
     * @return java.util.List<com.liveinstars.account.business.domain.bo.User>
     */
    List<User> getNotAuthorityUserListByRoleId(Integer roleId);

    User getUserById(Integer id);

    //获取用户信息
    List<User> getUsersByIds(List<Integer> userids);

    Result<Boolean> smsLogin(PhoneSmsRequest request);

    boolean updateUserInfo(UnifyAppUpdateUserInfoReq request);

    /*
    更新用户的地理位置信息
     */
    boolean updateLocation(String location, Integer userId);
}
